USE [@DATABASE]
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[fn_PersonelAdSoyad]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
DROP FUNCTION [fn_PersonelAdSoyad];
END
GO
CREATE FUNCTION [fn_PersonelAdSoyad] (@pID as nvarchar(25))
RETURNS nvarchar(50) AS
BEGIN
Declare @Isim as nvarchar(200)
Select @Isim=Ad + ' ' + Soyad from Personel WITH (NOLOCK) WHERE pID=@pID
Return @Isim
END